﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ALiteTeam.PackageTracer.Core
{
    public class QueryEventArgs : EventArgs
    {
        public QueryEventArgs(string result, bool isSuccess) { this.Result = result; this.Success = isSuccess; }
        public string Result { get; set; }
        public bool Success { get; set; }
    }

    /// <summary>
    /// 异步查询快递状态
    /// </summary>
    public interface IQueryService
    {
        /// <summary>
        /// 摘要信息完成查询事件
        /// </summary>
        event EventHandler<QueryEventArgs> QuerySummaryCompleted;

        /// <summary>
        /// 明细信息完成查询事件
        /// </summary>
        event EventHandler<QueryEventArgs> QueryDetailsCompleted;

        /// <summary>
        /// 异步获取摘要信息
        /// </summary>
        void GetSummary();

        /// <summary>
        /// 异步获取摘要信息的回调方法
        /// </summary>
        /// <param name="target"></param>
        //void CallbackQuerySummary(IAsyncResult target);

        /// <summary>
        /// 异步获取明细信息
        /// </summary>
        void GetDetails();

        /// <summary>
        /// 异步获取明细信息的回调方法
        /// </summary>
        /// <param name="target"></param>
        //void CallbackQueryDetails(IAsyncResult target);
    }
}